From: Josef Schlehofer Date: Wed, 8 Oct 2025 19:47:02 +0000 (+0200) Subject: snort3: enable/disable options based on package availability X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=02f78bc30acceab54c97165c09dbdab4297539bd;p=feed%2Fpackages.git snort3: enable/disable options based on package availability This simplifies checks enabling/disabling features, if packages are present instead of having checks for specific architectures. TCMALLOC_LIBRARIES is removed as it's auto-detected, unlike vectorscan which requires explicit HS_INCLUDE_DIRS. Fixes: 126364e105fbcfde0617f58c39048c7d56c17a06 ("snort3: refactor architecture-specific dependencies and CMake options") Signed-off-by: Josef Schlehofer --- diff --git a/net/snort3/Makefile b/net/snort3/Makefile index d41d4a945b..49cb6071ad 100644 --- a/net/snort3/Makefile +++ b/net/snort3/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=snort3 PKG_VERSION:=3.9.5.0 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/snort3/snort3/tar.gz/$(PKG_VERSION)? @@ -56,25 +56,10 @@ CMAKE_OPTIONS += \ -DMAKE_PDF_DOC:BOOL=NO \ -DMAKE_TEXT_DOC:BOOL=NO \ -DHAVE_LIBUNWIND=OFF \ - -DHAVE_LZMA=ON - -ifneq ($(findstring powerpc,$(CONFIG_ARCH))$(findstring mips,$(CONFIG_ARCH)),) - CMAKE_OPTIONS += \ - -DENABLE_TCMALLOC=OFF -else - CMAKE_OPTIONS += \ - -DENABLE_TCMALLOC=ON \ - -DTCMALLOC_LIBRARIES=$(STAGING_DIR)/usr/lib/libtcmalloc.so -endif - -ifneq ($(findstring x86_64,$(CONFIG_ARCH))$(findstring aarch64,$(CONFIG_ARCH)),) - CMAKE_OPTIONS += \ - -DENABLE_HYPERSCAN=ON \ - -DHS_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/hs -else - CMAKE_OPTIONS += \ - -DENABLE_HYPERSCAN=OFF -endif + -DHAVE_LZMA=ON \ + -DENABLE_TCMALLOC=$(if $(CONFIG_PACKAGE_gperftools-runtime),ON,OFF) \ + -DENABLE_HYPERSCAN=$(if $(CONFIG_PACKAGE_vectorscan-runtime),ON,OFF) \ + $(if $(CONFIG_PACKAGE_vectorscan-runtime),-DHS_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/hs) TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/daq3